import { NetManager } from "./app_base/module/net/NetManager";

import { Timer } from "./app_base/module/timer/Timer";
import { ViewManager } from "./app_base/module/view/ViewManager";

import { EventDispatcher } from "./app_base/base/event/EventDispatcher";
import { md5 } from "./app_base/module/utils/md5";
import { ResourceManager } from "./app_cocos/resource/ResourceManager";
import { StorageUtils } from "./app_base/module/utils/StorageUtils";
import { Application } from "./app_base/base/Application";
import { CocosNativeHelper } from "./app_cocos/native/CocosNativeHelper";
import { BusinessCenter } from "./app_base/module/business/BusinessCenter";
import { PublisherManager } from "./app_cocos/publisher/PublisherManager";

export class app {
    public static version: "1.0.0"

    public static App: Application = new Application()

    /**
    * 数据存储
    */
    public static storage = new StorageUtils()

    /**
    * 定时器
    */
    public static timer = new Timer()

    /**
    * 多平台管理，集成平台的登录，支付等功能。
    */
    public static publisher = new PublisherManager()

    /**
    * 事件中心
    */
    public static eventCenter = new EventDispatcher()

    /**
    * 网络管理器
    */
    public static net = new NetManager()

    /**
    * 调用native方法
    */
    public static native = new CocosNativeHelper()

    /**
    * 视图管理器
    */
    public static viewManager = new ViewManager();

    /**
    * md5
    */
    public static md5 = md5

    /**
    * 资源加载
    */
    public static res = new ResourceManager()

    // /**
    // * 条件系统
    // */
    // public static condition = new ConditionCenter()


    /**
     * 事务中心
     */
    public static businessCenter = new BusinessCenter()

}

// (globalThis as any)['app'] = (globalThis as any)['app'] || __app